/****************************************************
          File Name:13-4.h
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sat 03 Jan 2015 07:49:55 PM CST
*****************************************************/

#ifndef header_h_
#define header_h_

#include <iostream>

using std::ostream;

class Port
{
    private:
        char *brand;
        char style[20];
        int bottles;
    public:
        Port(const char *br = "none", const char *st = "none", int b = 0);
        Port(const Port & p);                           // initailize
        virtual ~Port() { delete [] brand; }
        Port & operator=(const Port & p);               // assignment
        Port & operator+=(int b);
        Port & operator-=(int b);

        int BottleCount() const { return bottles; }
        virtual void show() const;
        friend ostream & operator<<(ostream & os, const Port & p);
};

class VintagePort : public Port
{
    private:
        char *nickname;
        int year;
    public:
        VintagePort();
        VintagePort(const char *br, int b, const char *nn, int y);
        VintagePort(const VintagePort & vp);
        ~VintagePort() { delete [] nickname; }

        VintagePort & operator=(const VintagePort & vp);
        void show() const;
        friend ostream & operator<<(ostream & os, const VintagePort & vp);
};

#endif
